package edu.spex.yjl.week09.work02;
//设计动物类Animal
//成员属性1，动物的名字，name，String类型，访问类型为private
//成员属性2，动物的叫声，sounds，类型为List，sounds用来储存动物的各种叫声，访问类型为private，比如
//List sounds = new ArrayList();
//sounds.push("瞄");
//sounds.push("敖");
//成员属性3，动物的食物，foods，类型为List，foods用来存储该动物爱吃的各种食物对象Food，访问类型为private，比如
//List foods = new ArrayList();
//foods.add(new Food("鱼", 10));
//foods.add(new Food("米饭", 3));
//构造方法，自行设计
//成员方法1，void eat()，方法体里输出打印“能吃就能睡”
//成员方法其他，name、sound、food对应的getter和setter
import java.util.*;
import java.util.ArrayList;
import java.util.List;

public class Animal {
    private String name;
    private List sounds;
    private List foods;
    public Animal(){

    }
    public Animal(String name, List sounds,List foods) {
        this.name = name;
        this.sounds = sounds;
        this.foods=foods;
    }

    public String getName() {
        return name;
    }

    public List getFoods() {
        return foods;
    }

    public void setFoods(List foods) {
        this.foods = foods;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List getSounds() {
        return sounds;
    }

    public void setSounds(List sounds) {
        this.sounds = sounds;
    }


}
